<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <title>阿福易购-收货地址</title>
    <link rel="stylesheet" href="/css/app.css">
</head>
<body ontouchstart="">
<header class="ui-header ui-header-stable    af-header">
    <ul class="ui-row-flex">
        <li class="ui-col ui-flex ui-flex-pack-start" ontouchstart="window.history.back()" >
            <i class="ui-icon-return af-icon-home"></i>
        </li>
        <li class="ui-col ui-flex ui-flex-pack-center">
            <h1>收货地址</h1>
        </li>
        <li class="ui-col ui-flex ui-flex-pack-end">
        </li>
    </ul>
</header>


<footer class="ui-footer af-footer">
    <div class="ui-btn-wrap" style="margin-top: -10px;">
        <button class="ui-btn-lg ui-btn-danger"  onclick="window.location.href='/my-address-create.html'">
            新建收货地址
        </button>
    </div>
</footer>

<div class="ui-container"  >

    <ul class="ui-address-card">
        <li class="ui-border-tb" data-id="1">
            <h3><font class="name">李东</font>   <font class="phone">138****2572</font></h3>
            <div class="address">河南省郑州市管城区金城街紫藤苑5号楼5单元50号</div>
            <div class=" tool  ui-border-t">
                <span class="select">
                   <label class="ui-radio">
                       <input type="radio" checked name="radio">
                       设为默认
                   </label>
                </span>
                <span class="op ui-tiled">
                    <a href="my-address-create.html"><i class="ui-icon-order"></i>编辑</a>
                    <label class="J-del"><i class="ui-icon-delete"></i>删除</label>
                </span>
            </div>
        </li>
        <li class="ui-border-tb" data-id="2">
            <h3><font class="name">李东</font>   <font class="phone">138****2572</font></h3>
            <div class="address">河南省郑州市管城区金城街紫藤苑5号楼5单元50号</div>
            <div class=" tool  ui-border-t">
                <span class="select">
                   <label class="ui-radio">
                       <input type="radio" name="radio">
                       设为默认
                   </label>
                </span>
                <span class="op ui-tiled">
                    <a href="my-address-create.html"><i class="ui-icon-order"></i>编辑</a>
                    <label class="J-del"><i class="ui-icon-delete"></i>删除</label>
                </span>
            </div>
        </li>
    </ul>


</div>



<script src="/lib/zepto.min.js"></script>
<script src="/js/frozen.js"></script>
<script src="/js/app.min.js"></script>
<script>
    $('.J-del').on('click',function () {
        var that=$(this);
        var li=that.closest('li'),id=li.attr('data-id');
       var dg=$.dialog({
           title:'提示信息',
           content:'确定要删除吗？',
           button:['取消','确认']
       });

        dg.on('dialog:action',function (e) {
            if(e.index===1){
                var lk=Locked();
                $.ajax({
                    url:'/ajax_success.json',type:'get',dataType:'json',data:{id:id,_token:_token},
                    success:function (res) {
                        res.status&&li.fadeOut(500,function () {
                            $(this).remove();
                        });
                    },
                    error:function (e) {
                        topTip(e.message||Global.message['404']);
                    },
                    complete:function () {
                        UnLocked(lk);
                    }
                });
            }
        });
    });
</script>

</body>
</html>